// @FileName  :example1a.c
// @Time      :2024/2/29 23:40
// @Author    :YKW
//# include <bits/stdc++.h>
//using namespace std;
#include <stdio.h>

void main() {
    double e;
    scanf("%lf", &e);
    double pi = 1.0 + 1.0 / 3;
    double term = 1.0 / 3;
    int n = 2;
    while (1) {
        if (term * 2 < e)
            break;
        n++;
        term *= (double) (n - 1) / (2 * n - 1);
        pi += term;
    }
    printf("%d %.7lf\n", n, pi * 2);
    return 0;
}
